package p500;

/**
 *
 * @version 1.0 <br>
 * @author pengjz <br>
 * @date 2022/2/14 11:19 <br>
 */
public class Leetcode_540 {

    public int singleNonDuplicate(int[] nums) {
        for (int i = 1; i < nums.length; i++) {
            nums[i] = nums[i - 1] ^ nums[i];
        }
        return nums[nums.length - 1];
    }

}
